package com.example.controller;

import com.example.common.RedisClientTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author kangshuai
 */
@RestController
@RequestMapping(value = "/test")
public class TestController {

    @Autowired
    RedisClientTemplate redisClientTemplate;

    @GetMapping(value = "/testSet/{key}/{value}")
    public String testSet(@PathVariable String key, @PathVariable String value){
        redisClientTemplate.setToRedis(key, value);
        redisClientTemplate.getRedis(key);
        return "ok";
    }

}
